Contracts Architecture

Contracts Architecture

┌─────────────┐      mints tokens       ┌──────────────┐
│   WTDSale    │ ◄────────────────────── │   WTDToken    │
│              │                         │  (UUPS Proxy) │
│  Accepts:    │                         └──────────────┘
│  USDC/USDT/  │
│  ETH         │      creates vesting
│              │ ─────────────────────► ┌──────────────────┐
└─────────────┘                        │   WTDVesting      │
                                       │                    │
                                       │  Holds & releases  │
                                       │  tokens on schedule │
                                       └──────────────────┘

┌─────────────────────┐
│ WTDLiquidityManager  │
│                      │
│ Locks Uniswap v4     │
│ LP positions         │
│ Collects fees        │
└─────────────────────┘

Contract Details

WTDToken

Property
Value

Type

UUPS Upgradeable Proxy

Solidity

^0.8.28

Inherits

ERC20, ERC20Burnable, ERC20Permit, ERC20Votes, AccessControl, UUPS, Pausable

Key Roles

DEFAULT_ADMIN_ROLE, GOVERNANCE_ROLE

The token contract manages the 100 billion max supply through 10 allocation categories. It supports burning, pausing, gasless approvals (EIP-2612 permit), and on-chain voting delegation.

WTDSale

Property
Value

Type

Non-upgradeable

Solidity

^0.8.28

Inherits

ReentrancyGuard, AccessControl

Key Roles

DEFAULT_ADMIN_ROLE, MULTI_SIG_ROLE

Dependencies

WTDToken, WTDVesting, USDC, USDT, Chainlink ETH/USD

The sale contract handles three investment rounds. It accepts USDC, USDT, and ETH payments, calculates token amounts based on configured pricing, and automatically creates vesting schedules in the WTDVesting contract.

WTDVesting

Property
Value

Type

Non-upgradeable

Solidity

^0.8.28

Inherits

ReentrancyGuard, AccessControl

Key Roles

DEFAULT_ADMIN_ROLE, VESTING_ROLE

Dependencies

WTD Token (ERC20)

The vesting contract manages two types of vesting: investor vesting (created automatically during purchases) and team/advisor vesting (created manually by admin). It supports TGE unlock, weekly vesting for investors, and monthly vesting for team members.

WTDLiquidityManager

Property
Value

Type

Non-upgradeable

Solidity

^0.8.28

Inherits

AccessControl, ReentrancyGuard

Key Roles

DEFAULT_ADMIN_ROLE

Dependencies

Uniswap v4 PoolManager, PositionManager, WTD Token, USDC

The liquidity manager locks Uniswap v4 LP NFT positions, supports eternal locks, and allows fee collection from locked positions without removing liquidity.

Contract Relationships

From
To
Interaction

WTDSale

WTDVesting

Creates vesting schedules on purchase via createVesting()

WTDSale

USDC/USDT

Receives payments via safeTransferFrom()

WTDSale

Chainlink

Reads ETH/USD price for ETH purchases

WTDVesting

WTDToken

Holds tokens and transfers to beneficiaries on claim

WTDToken

Admin

Admin claims allocations to mint tokens

WTDLiquidityManager

Uniswap v4

Locks LP NFTs, collects trading fees

Last updated